export function serialize(obj) {
    let result = [];
    Object.keys(obj).forEach(key => {
        result.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]));
    });
    return result.join('&');
}